import * as types from './ActionTypes';
import api from '../api/city';
import L from 'fyLocale';

var urls={
   getList:{

   }
};

export function getList(){  
  return (dispatch, getState) => {
      return api.getCitys(function(rs){
        dispatch({
           type:types.GET_LIST,
           list:rs
        });
      });
  }
}


export function change(){
	return (dispatch,getState)=>{
		dispatch({
			type:types.CHANGE,
			b:"i am change in redux "+L.getString("APP_NAME")
		});
	}
}

export function getList2(params){  
  return (dispatch, getState) => {
      return api.getCitys2({
          params:{parentCode:"xxx",a:params.a},
          success:function(rs){
              console.log(rs);
          },
          failure:function(rs){
              console.log(rs);
          },
      });
  }
}